import { defineStore } from "pinia";
export const useUserStore = defineStore(
  "user",
  () => {
    const user = ref({});
    const count = ref(0);
    const token = ref("");
    const addCount = () => {
      console.log(21312);

      count.value++;
    };
    const setToken = (val) => {
      console.log(val, "valvalval");
      token.value = val;
    };
    const getToken = () => {
      return token.value;
    };
    return { token, user, count, addCount, setToken, getToken };
  },
  {
    persist: true,
  }
);
